package ClientLogic;


import Messages.*;


/**   izmenit
 * This class is responsible for dealing with messages received from the Server .
 
 
 * @author Andrey
 * @author Igor
 * 
 */

public class ClientTaskAssignment {

	public Object msg=null; //=new Message(Message.MessageType.MESSAGE_LOGIN);

	
	/**
	 * This class is responsible for initial treatment of messages
	 * received from the Server .
	 * 
	 */
	public void SetMessage(Object msg) {
		if (msg == null)
			System.err.println("null message from ClientTaskAssignment SetMessage method");
		this.msg = (Message) msg;
		if (this.msg==null)
			System.err.println("null message from ClientTaskAssignment SetMessage method this.msg");
	}


	/**
	 * This class is responsible for returning of messages
	 * received from the Server .
	 * 
	 */


	
	
	
	/**
	 * This method is responsible for recognizing and returning MessageLoginReply 
	 * message from the server .
	 * 
	 */
	
	public MessageLoginReply getLoginReply() {
		if (this.msg == null)
			System.err.println("null message getLoginReply");
		return (MessageLoginReply) (this.msg);
	}
	
	
 
	
 
 
 
}
